package org.firefly.fx.service.common.impl;

import org.firefly.fx.service.common.IReceiveService;
import org.firefly.fx.service.common.IRouteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ApplicationObjectSupport;

public abstract class AbstractRouteServiceImpl extends ApplicationObjectSupport implements IRouteService {
	protected static final Logger logger =  LoggerFactory.getLogger(AbstractRouteServiceImpl.class);
	
    protected IReceiveService getServiceImpl(String service){
    	Object obj = getApplicationContext().getBean(service);
    	if(obj instanceof IReceiveService){
    		return (IReceiveService) obj;
    	}else{
    		return null;
    	}
    }
    
}